<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    var scriptTag = document.createElement('script');
    var srcAttr = document.createAttribute('src');
    srcAttr.value = 'js/1.2.js';
    scriptTag.setAttributeNode(srcAttr);
    document.head.appendChild(scriptTag);
</script>
</body>
</html>